<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use EasyWeChat\Foundation\Application;
class UserController extends Controller
{
    public $user;
    
    
    public function __construct(Application $app) {
        $this->user = $app->user;
    }
    
    //获取所有关注的用户
    public function getAllUsers(){
        $allUsers = $this->user->lists();
        return $allUsers;
    }
    
    //获取用户信息
    public function userDetail($openId){
        return $this->user->get($openId);
    }
    
    //给用户加备注
    public function remake(){
        if($this->user->remark('oQOhE1ao6mO1dcx4pQIGF-w7TB3A', '郎雪')){
            return 'OK';
        }
    }
}
